package com.wy.Service.impl;

import com.wy.Service.LouyvService;
import com.wy.dao.LouyvDao;
import com.wy.pojo.Louyv;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service("louyvServer")
@Transactional
public class LouyvServerimpl implements LouyvService {
    @Resource
    private LouyvDao louyvDao;

    @Override
    public List<Louyv> searchAll() {
        return louyvDao.findAll();
    }

    @Override
    public List<Louyv> searchidAll(Integer resideid) {
        return louyvDao.searchidAll(resideid);
    }

    @Override
    public void del(Integer id) {
        louyvDao.deleteById(id);
    }
    @Override
    public void add(Louyv louyv) {
        louyvDao.save(louyv);
    }



}
